package com.foreknow.oppExer1.exer6;

/**
 * @author shkstart
 * @create 2021-07-28 14:09
 */
public class Circle implements  ShapePara {
    public double radius; //半径
    private double x;//圆心横坐标
    private double y; //圆心纵坐标

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public void setCenter(double x,double y) {
        this.x = x;
        this.y=y;
    }



    public double getRadius() {
        return radius;
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double getArea() {
        return radius*radius*Math.PI;
    }

    @Override
    public double getCircumference() {
        return radius*2*Math.PI;
    }
}
